package cn.edu.scau.cmi.dengzejun.chapter09;

import java.util.*;

public class Example9_2 {
	public static void main(String args[]) {
		String[] a= {"melon","apple","pear","banana"};
		String[] b=Arrays.copyOf(a, a.length);
		System.out.println("use the user's SortString function:);");
		SortString.sort(a);
		System.out.println("The result is :");
		for (String s:b) {
			System.out.print(" "+s);
		}
		System.out.println("");
		System.out.println("use the Array class");
		Arrays.sort(b);
		System.out.println("The result is :");
		for (String s:b) {
			System.out.print(" "+s);
		}
		return;
	}
}
